import java.util.Arrays;

public class Test {

    public static int search(int[] arr){

        //int x = 0;
        for (int i = 0; i < arr.length; i++) {

            int z  = 0;
            for (int j = i+1; j < arr.length; j++) {
                if(arr[i] == arr[j]){
                    z = 1;
                }
            }

            if(z == 0){
                return arr[i];
            }
        }
        return 0;
    }

    public static void main1(String[] args) {

        int[] arr = new int[]{4, 1, 2, 1, 2};
        int ret = search(arr);
        if(ret == 0){
            System.out.println("这个数组中都是元素都出现了两次");
        }else {
            System.out.println(ret);
        }
    }



    public static int fun(int[] arr) {

        int x = 1;
        //int[] num = new int[arr.length];

        for (int i = 0; i < arr.length-1; i++) {

            if(arr[i] != arr[i+1] || i == arr.length-2) {

                if(x > (arr.length)/2) {
                    return arr[i];
                }
                x = 1;
            }
            x++;
        }

        return 0;
    }


    public static void main2(String[] args) {

        int[] arr = new int[]{2,2,1,1,1,2,2};
        int[] num = new int[6];

        Arrays.sort(arr);
        int r = fun(arr);

        System.out.println(r);
        //int ret = max(num);
    }


    public static boolean found(int[] arr) {

        for (int i = 0; i < arr.length-2; i++) {

            if(arr[i]%2 == 1 && arr[i+1]%2 == 1 && arr[i+2]%2 == 1) {

                return true;
            }
        }

        return false;
    }


    public static void main3(String[] args) {

        int[] arr = new int[]{1,2,34,3,4,5,7,23,12};

        boolean z =  found(arr);
        System.out.println(z);
    }



    public static void main(String[] args){
        int x = 0;
        int y = 0;
        int k = 0;
        for (int z = 0; z < 5; z++) {
            if ((++x > 2) && (++y > 2) && (k++ > 2)){
                x++;
                ++y;
                k++;
            }
        }
        System.out.println(x + "" +y + "" +k);
    }

}
